package com.hzit.bj1804.dianservice.service;

import com.github.pagehelper.PageInfo;
import com.hzit.bj1804.dian.entity.Memberbase;
import com.hzit.bj1804.dian.vo.MemberPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
public interface MemberbaseService {
    PageInfo<Memberbase> seleteAllAge(@RequestParam("limit") int limit,@RequestParam("page") int page);//查询所有会员并分页
    List<Memberbase> seleteAll();//查询所有会员
    Memberbase seleteByNmae(@RequestParam("mname") String mname);//根据会员名称查询会员信息
    Memberbase select(@RequestParam("mname") String mname,@RequestParam("mpassword") String mpassword);//根据会员名来判断密码是否正确
    List<Memberbase> seleteByTime(@RequestParam("starttime") Date starttime, @RequestParam("endtime") Date endtime, @RequestParam("mname") String mname);//根据注册时间段和会员名称查询会员信息
    PageInfo<Memberbase> seleteByTimePage(@RequestParam("limit") int limit,@RequestParam("page") int page,@RequestParam("starttime") Date starttime, @RequestParam("endtime") Date endtime, @RequestParam("mname") String mname);//根据注册时间段和会员名称查询会员信息并分页
    int insert(@RequestBody Memberbase memberbase);//添加会员信息
    int update(@RequestParam("mid") int mid,@RequestParam("mstatus")String mstatus);//根据ID来改变状态
    int updatePassword(@RequestParam("mname") String mname,@RequestParam("newmpassword") String newmpassword);//根据会员名来修改密码
    Memberbase selectByMid(@RequestParam("mid") int mid);//根据ID来查询会员信息
}
